package com.example.mapper;

import com.example.DTO.ProductDTO;
import com.example.entity.Product;
import com.example.vo.ProductVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProductMapper {
    List<ProductVO> selectAll();

    ProductVO selectById(Integer id);

    List<ProductVO> selectHistory(Integer sId);

    List<ProductVO> listedProduct();

    void insert(Product employee);

    void updateById(Product employee);

    @Delete("delete from `product` where id = #{id}")
    void deleteById(Integer id);

    List<ProductVO> selectAll(ProductVO product);
    List<ProductVO> selectAllByMerchant(Integer sId,ProductVO product);


    void freezeById(Integer id);


    int getproid(Integer id);

    @Select("select * from product where id=#{productId}")
    Product getById(int productId);

    List<ProductDTO> selectByText(Product product);
}
